{% extends "_base.html" %}


{% block  title %}容器YML列表{% endblock %}

{% block left %}
    {% include "_left.html" with cmdb_docker_yml_active="active" %}
{% endblock left %}

{% block page-content %}


    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
            <h2>资产管理</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="/">主页</a>
                </li>
                <li>容器管理</a>
                </li>
                <li class="active">
                    <strong>容器YML列表</strong>
                </li>
            </ol>
        </div>

    </div>
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>Docker-Compose yml列表</h5>
                    </div>
                    <div class="ibox-content">

                        <div class="table-responsive">

                            <a href="{% url 'cmdb:docker_yml_add' %}" class="btn btn-primary">新建YML</a>
                            <a href="/admin/cmdb/dockerymlgroup/" class="btn btn-info" target="_blank">组类管理</a>

                            <table class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>标识</th>
                                    <th>组类</th>
                                    <th>文件名</th>
                                    <th>状态</th>
                                    <th class="col-lg-3">动作</th>
                                </tr>
                                </thead>
                                <tbody>

                                {% for row in object_list %}

                                    <tr>
                                        <td class="center">
                                            <a href="{% url 'cmdb:docker_yml_edit' row.id %}">{{ row.name }}</a>
                                        </td>
                                        <td class="center">{{ row.group }}</td>
                                        <td class="center">{{ row.file }}</td>
                                        <td><i class="fa fa-{% if row.state %}check-square text-navy{% else %}minus-square text-danger{% endif %}"></i></td>
                                        <td>
                                            <a class="btn btn-success btn-xs" href="{% url 'cmdb:docker_compose_list' %}?yml={{ row.id }}">容器编排</a>
                                            <a class="btn btn-primary  btn-xs " href="/admin/cmdb/dockeryml/{{ row.id }}/change/" target="_blank">编辑</a>
                                            {# <button type="button" class="btn btn-danger btn-xs">删除</button> #}
                                        </td>
                                    </tr>
                                {% endfor %}

                                </tbody>

                            </table>


                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock page-content %}

